package chapters15_bingfa.chapters15_3;

/**
 * Created by xinxuchu on 2020/1/29.
 */
public class Racer extends Thread {

    FireFlag fireFlag;

    public Racer(FireFlag fireFlag) {
        this.fireFlag = fireFlag;
    }

    @Override
    public void run(){
        try {
            this.fireFlag.waitForFired();
            System.out.println("start run " + Thread.currentThread().getName());
        }catch (InterruptedException e){

        }
    }
}
